<template>
  <div id="app">
    <!-- v-model 本身就是表单元素的方法 input select checkout radio -->
    <!-- v-model是谁的语法糖 -->
    <!-- input v-model = :value + @input -->
    <!-- select v-model = :value + @change -->
    <!-- checkout radio v-model = :checked + @change -->
    <!-- 最简单的轮子 -->
    <el-input v-model="value1" placeholder="请输入" id="kkk"></el-input>
    {{ homeData }}
    <button @click="homeGetData">修改</button>
  </div>
</template>

<script>
import ElInput from './components/ElInput.vue'
import { mapMutations } from 'vuex';
export default {
  components: {
    ElInput
  },
  data() {
    return {
      value1: "",
      value2: "",
    }
  },
  computed: {
    homeData() {
      return this.$store.state.home.homeData
    }
  },
  created() {
    // this.$store.state.list.listData;
    // this.$store.commit('home/homeGetData')
    // this.$store.commit('listGetData')

    // this.$store.dispatch('home/homeGetData')
    // this.$store.dispatch('listGetData')
  },
  methods: {
    ...mapMutations('home', ['homeGetData']),
    // ...mapMutations(['listGetData'])

  }
}
</script>

<style>
</style>